/**
 * This file is part of the CAKIS project.
 * 
 * Copyright (c) 2009-2010 - Florian Arndt, Christian Kerl
 * 
 * @license GNU Lesser General Public License v3 <http://www.opensource.org/licenses/lgpl-3.0.html>
 * @since   01.03.2010
 * @version SVN: $Id: Product.java 119 2010-05-09 20:27:45Z christian-kerl@web.de $
 */

package org.cakis.server.model;

import java.io.Serializable;

import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.xml.bind.annotation.XmlTransient;

/**
 * Product
 *
 * @author Christian Kerl
 */
@Entity
public class Product extends BaseProduct implements Serializable {
    private static final long serialVersionUID = 1L;

    private String eanNumber;
    private ProductQuantity standardQuantity = new ProductQuantity();

    private ProductType type;

    public String getEanNumber() {
        return eanNumber;
    }

    public void setEanNumber(String eanNumber) {
        this.eanNumber = eanNumber;
    }

    @Embedded
    public ProductQuantity getStandardQuantity() {
        return standardQuantity;
    }

    public void setStandardQuantity(ProductQuantity standardQuantity) {
        this.standardQuantity = standardQuantity;
    }

    @ManyToOne(optional = true)
    @XmlTransient
    public ProductType getType() {
        return type;
    }

    public void setType(ProductType type) {
        this.type = type;
    }
}
